package com.ecelin;

import com.ecelin.config.SqlSessionFactoryConfig;
import com.ecelin.enties.TbUserInfo;
import com.ecelin.mapper.TbUserInfoMapper;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;


/**
 * @author ycl
 */
public class MainApplication {
	private static SqlSessionFactory session = SqlSessionFactoryConfig.initSqlSessionFactory();

	public static void main(String[] args) {
		SqlSession sqlSession = session.openSession();
		TbUserInfoMapper mapper = sqlSession.getMapper(TbUserInfoMapper.class);
		TbUserInfo tbUserInfo = mapper.selectById(1);
		System.out.println(tbUserInfo);
		sqlSession.close();
	}


}
